﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MoreEPG.Model
{
    public class GuideImage
    {
        /// <summary>
        /// A unique ID for each Keyword.  This is what is output into the MXF.
        /// </summary>
        public int id_ { get; set; }

        /// <summary>
        /// Guide Image URL
        /// </summary>
        public string Url { get; set; }

        public string Name { get; set; }

        /// <summary>
        /// Contructor for the GuideImage Class
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="url"></param>
        public GuideImage(int Id,string name, string url)
        {
            id_ = Id;
            Name = name;
            Url = url;
        }

        /// <summary>
        /// Get ID in MXF Format
        /// </summary>
        /// <returns></returns>
        public string Id()
        {
            return "i" + id_.ToString();
        }

        /// <summary>
        /// Get an identifier the logo for the channel for display in the guide
        /// </summary>
        /// <returns>String in format "!Image!name"</returns>
        private void logoUID()
        {
            this._Uid = "!Image!" + Name.ToUpper();
        }


        private string _Uid;
        /// <summary>
        /// MC UID
        /// </summary>
        public string Uid
        {
            get
            {
                if (this._Uid == null)
                {
                    this.logoUID();
                }
                return this._Uid;
            }
            set
            {
                this._Uid = value;
            }
        }

    }
}
